{# 创建草稿、编辑草稿、编辑文章都是用的这个页面(markdown格式) #}

{% extends '../../layout/empty.njk' %}

{% block main %}
<div id="app"></div>
{% endblock %}

{% block pageData %}
<script>
  var env = '{{ env }}';
  var userID = {{ user.id }};
  var avatarURL = '{{ user.avatarURL }}';
  
  {% if draft %}
  var draft = {{ draft | dump | safe }};
  {% endif %}

  {% if article %}
  var article = {{ article | dump | safe }};
  {% endif %}

  var uploadPolicy = {{ uploadPolicy | dump | safe }};
</script>
{% endblock %}

{% block devjs %}
  {{ loadjs('entry/editor/editMarkdownDraft.js') }}
{% endblock %}